import request from '@/utils/request'

export function fetchList(query) {
    // const { pageSize = 10, page = 1, ...rest } = query || {}
    return request({
        url: '/profile',
        method: 'get',
        showLoading: false
    })
}
// 单个文章
export function OneList(id) {
    // const { pageSize = 10, page = 1, ...rest } = query || {}
    return request({
        url: '/profile/edit/' + id,
        method: 'get',
        showLoading: false
    })
}
export function cateList(val) {
    return request({
        url: '/profile/cata/' + val,
        method: 'get',
        showLoading: false
    })
}
export function cate() {
    return request({
        url: '/cate/',
        method: 'get',
        showLoading: false
    })
}
export function cateOther(id) {
    return request({
        url: '/cate/cate/' + id,
        method: 'get',
        showLoading: false
    })
}
export function ArticleUser(ids) {
    return request({
        url: '/profile/user/',
        method: 'get',
        params: { id: ids },
        showLoading: false
    })
}
// 新增文章/api/profile/add
export function ArticleAdd(ids) {
    return request({
        url: 'profile/add/',
        method: 'post',
        params: { id: ids },
        showLoading: false
    })
}